﻿using System;
using System.ComponentModel;
using System.Runtime.CompilerServices;


namespace FixtureManageSystem.Models
{
    public class Return : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;

        /// 借用人工号，实际呢？还东西的可能是另外一个人，这里先不考虑了
        private string personNo = String.Empty;
        public string PersonNo
        {
            get
            {
                return personNo;
            }
            set
            {
                if (value != this.personNo)
                {
                    personNo = value;
                }
            }
        }



        /// <summary>
        /// 条形码
        /// </summary>
        /// <param name="barCode"></param>

        private string barCode = String.Empty;
        public string BarCode
        {
            get
            {
                return barCode;
            }
            set
            {
                if (value != this.barCode)
                {
                    barCode = value;
                }
            }
        }


        /// <summary>
        /// 归还数量
        /// </summary>
        /// <param name="tel"></param>

        private int num;
        public int Num
        {
            get
            {
                return num;
            }
            set
            {
                if (value != this.num)
                {
                    num = value;
                }
            }
        }

        /// <summary>
        /// 归还时间
        /// </summary>
        /// <param name="BorrowTime"></param>

        private DateTime returnTime;
        public DateTime ReturnTime
        {
            get { return returnTime; }
            set { returnTime = value; }
        }

        private void OnPropertyChanged([CallerMemberName] String propertyName = "")
        {
            PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }
    }
}
